<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>迅搜-数据平台</title>
    <meta name="description" content="iNetHelper" />
    <script type="text/javascript" src="/static/jquery.min.js"></script>
    <link href="/static/jqueryui/jquery-ui.css" rel="stylesheet">
    <script src="/static/jqueryui/jquery-ui.js"></script>
    <link href="/static/admin.css" rel="stylesheet">
<script type="text/javascript">
if(!Array.indexOf)
{
    Array.prototype.indexOf = function(obj)
    {
        for(var i=0; i<this.length; i++)
        {
            if(this[i] == obj)
            {
                return i;
            }
        }
        return -1;
    }
}
</script>
</head>
<body>
<div class="header">
    <div class="logo">
        <a href="#">迅搜数据平台</a>
    </div>
    <div class="userinfo">
        <a href="#">
            <i class="icon user">&#xe607;</i><?php echo $_SESSION['inet_account']; ?>
        </a>
        <ul>
            <li><a href="<?php echo site_url("User/changepwd");?>">修改密码</a></li>
            <li><a href="<?php echo site_url("Login/logout");?>">退出</a></li>
        </ul>
    </div>
</div>
<div class="left" STYLE="float: left; width:250px;">
    <ul class="menu">
        <?php
            $all_menu = $this -> config -> item('menu');
        $key = 'default';
        if($_SESSION['inet_sys']) {
            $key = 'admin';
        }
        $menu = $all_menu[$key];
        ?>
        <?php foreach($menu as $item):?>
        <li><a showsub="false" <?php if(in_array($_SESSION['page'],$item['keys'])):?>class='active'<?php endif;?>><?php echo $item['title'];?></a>
            <ul class="submenu <?php if(in_array($_SESSION['page'],$item['keys'])):?>show<?php endif;?>">
            <?php foreach($item['list'] as $vitem):?>
            <li><a <?php if($_SESSION['page'] == $vitem['name']):?>class='active'<?php endif;?> href="<?php echo site_url($vitem['link']);?>"><?php echo $vitem['title'];?></a></li>
            <?php endforeach;?>
            </ul>
        </li>
        <?php endforeach;?>
    </ul>
</div>